package com.controller.secController;

import com.service.LoginService;
import com.dao.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/login")
public class LoginController {
    @Autowired
    private LoginService service;

    @RequestMapping("/getUser")
    @ResponseBody
    public UserInfo getUser(@RequestParam String id){
        System.out.println(11111);
        UserInfo user = service.getUser(id);
        System.out.println(22222);
        return user;
    }


}
